package com.tandashi.springbootstudy01.study.thread;

public class State implements Runnable{
    public static void main(String[] args) {
        Thread thread = new Thread(new State());
        System.out.println(thread.getState());
        thread.start();
        System.out.println(thread.getState());
        System.out.println(thread.isDaemon());
    }

    @Override
    public void run() {
        for (int i = 0; i < 5; i++) {
            System.out.println("多线程执行中");
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
